package com.itheima.service.impl;

import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.mapper.ClazzMapper;
import com.itheima.pojo.Clazz;
import com.itheima.pojo.PageResult;
import com.itheima.service.ClazzService;
import org.springframework.stereotype.Service;

import java.time.LocalDate;

@Service
public class ClazzServiceImpl extends ServiceImpl<ClazzMapper, Clazz> implements ClazzService {

    @Override
    public PageResult<Clazz> getClazzPage(String name, LocalDate begin, LocalDate end, int page, int pageSize) {

        Page<Clazz> clazzPage = Page.of(page,pageSize);
        clazzPage.addOrder(OrderItem.desc("update_time"));




        return null;
    }
}
